package com.ysh.function;

import java.util.function.Predicate;

/**
 * 袁胜虎 on 2022/9/2 15:29
 */
public class PredicateTest {
    public static void main(String[] args) {
        //predicate:断言
        Predicate<String> predicate = (s)->s != null;

        if (predicate.test("s")){
            System.err.println("代码继续执行");
        }else {
            System.err.println("数据不符合要求");
        }
    }
}
